from flask import Flask, request, abort, render_template

app = Flask(__name__)


@app.route('/')
def hello_world():  # put application's code here
	name = request.args.get('name')
	if name:
		print(name)
	else:
		abort(500)
	return 'Hello World!'


@app.errorhandler(404)
def page_not_found(error):
	print(error)
	return  render_template('404.html'), 404


if __name__ == '__main__':
	app.run()
